package com.castillo.exam;


import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class ProviderAction extends ActionSupport  implements ModelDriven<Provider>{
	private Provider provider = new Provider();
	private List<Provider> providerList = new ArrayList<Provider>();
	private ProviderDAO providerDAO = new ProviderDAO();

	@Override
	public Provider getModel() {
		// TODO Auto-generated method stub
		return provider;
	}
	
	public String seeAll(){
		providerList = providerDAO.selectAll();
		return SUCCESS;	
		
	}

	public Provider getProvider() {
		return provider;
	}

	public void setProvider(Provider provider) {
		this.provider = provider;
	}

	public List<Provider> getProviderList() {
		return providerList;
	}

	public void setProviderList(List<Provider> providerList) {
		this.providerList = providerList;
	}

	public ProviderDAO getProviderDAO() {
		return providerDAO;
	}

	public void setProviderDAO(ProviderDAO providerDAO) {
		this.providerDAO = providerDAO;
	}

}
